part of '../repository.dart';

class _SignignInSuccessfulResponseDto extends Equatable {
  const _SignignInSuccessfulResponseDto._internal({
    required this.accessCredentialsDto,
    required this.userDto,
  });

  final ApiAccessCredentialsDto accessCredentialsDto;
  final ApiUserDto userDto;

  @override
  List<Object?> get props {
    return [
      accessCredentialsDto,
      userDto,
    ];
  }

  factory _SignignInSuccessfulResponseDto.fromJson(Map<String, dynamic> json) {
    final accessCredentialsDto = ApiAccessCredentialsDto.fromJson(json['access_credentials']);
    final userDto = ApiUserDto.fromJson(json['user']);

    return _SignignInSuccessfulResponseDto._internal(
      accessCredentialsDto: accessCredentialsDto,
      userDto: userDto,
    );
  }
}
